<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			
		</style>
		<script src="js/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
         var i=0;
         function action(){
         		var str="<xml><ToUserName><![CDATA[toUser]]></ToUserName><FromUserName><![CDATA[ooFdKs1JBprEPFdGiTGrY1Xf2ioQ]]></FromUserName> <CreateTime>1348831860</CreateTime>"+
         "<MsgType><![CDATA[text]]></MsgType><Content><![CDATA[this is a test"+(i+1)+"]]></Content><MsgId>1234567890123456</MsgId></xml>";
         		$.ajax({
         		type:"post",
         		url:"http://localhost:8080/meeting/wx.action",
         		async:false,
         		data : str,
         		dataType : "xml",
         		success : function(data){
         			console.log(data);
         		},
         		error: function(data){
         			console.log(data);
         		}
         	});
         	i++;
         }
         var time_co;
         function ac(){
         	
          time_co=setInterval("timd()",300);
         }
         function timd(){
         	action();
         	if (i>200) {
         			clearInterval(time_co);
         		}
         	
         }
         var idc=0;
         function act(){
        	 var c= setInterval(function(){
        		 var openid="ooFdKs1JBprEPFdGiTGrY1Xf2io"+idc;
        		 idc++;
              	$.post("/meeting/control/rob.action?openid="+openid+"&redpack=2&noce=NOCE",{},function(data){
              		var conte="<div>"+data+"</div>";
              		$("#content").append(conte);
              	})
        		 if(idc==200){
        			 clearInterval(c);
        		 }
        	 },30);
         }
		</script>
	</head>
	<body>
		<button onclick="ac()">点击</button>
		<button onclick="act()">很好</button>
		<div id="content"></div>
	</body>
</html>
